<?php

namespace App\Http\Controllers\admin;

use Illuminate\Http\Request;

use App\Http\Requests;
use App\Http\Controllers\Controller;
use DB;
class LoginController extends Controller
{
    /**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
    /* public function index()
	{
		$use_info = seeion('use_info');
		dd($use_info);
	} */
	
	
	public function login()
    {
        return view('admin/login.login');
    }

 
	  //后台登录
    public  function dologin(Request $request)
    {
	   $res = DB::table('use')->where->('name' => $request->name, 'password' => $request->password);


       if($res){
           return redirect('admin.login')-with('res'->$res);
       }else{
            return back()->with("/login","请登录");
       }  
		
        return redirect('admin/layout');
    }
	
	
}
 